﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DLL
{
	/// <summary>
	/// 控制基础类
	/// </summary>
	/// <![CDATA[2014-6-27 10:00:28]]>
	public class ComponentBase : TonyNet4V1.ComponentBase
	{
		/// <summary>
		/// 登录用户ID
		/// </summary>
		protected int nUserID = 0;
		/// <summary>
		/// 登录用户单位ID
		/// </summary>
		protected int nDepartment = 0;

		public ComponentBase(System.Web.UI.Page page)
			: base(page)
		{
			try
			{
				nUserID = Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]);
				nDepartment = Convert.ToInt32(System.Web.HttpContext.Current.Session["DepartmentID"]);
			}
			catch
			{
				nUserID = 0;
				nDepartment = 0;
			}
		}
	}
}
